package com.gaga.common.enums;

/**
 *
 */
public enum SingleDoubleModelType {
    SINGLE("single", "单模型"),

    DOUBLE("double", "双模型"),

    COMPATIBLE("compatible", "兼容模式"),

    ;

    private final String code;
    private final String desc;

    SingleDoubleModelType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static SingleDoubleModelType getByCode(String code) {
        for (SingleDoubleModelType value : SingleDoubleModelType.values()) {
            if (value.code.equalsIgnoreCase(code)) {
                return value;
            }
        }
        return SINGLE;
    }

}
